package com.ssss.builder;

import lombok.NoArgsConstructor;

/**
 * 指挥者，电脑店的老板，
 */
@NoArgsConstructor
public class Director {

//    private Builder  builder;


    // 使用多态，装机工很多，小明，小兰
//    public Director(Builder builder) {
//        this.builder = builder;
//    }

    // 老板只看组装后的成品--- 交到客户手中
//    public Computer createComputer(String board,String cpu,String memory){
//        this.builder.createBoard(board);
//        this.builder.createCpu(cpu);
//        this.builder.createMemory(memory);
//        return this.builder.getComputer();
//    }

    public void buildComputer(Builder builder){
        builder.createMemory("memory");
        builder.createCpu("cpu");
    }
}
